/*$(document).bind("contextmenu",
function() {
    return ! 1
}),*/
$(function () {
    document.addEventListener("keydown",
        function (a) {
            a = window.event || a;
            var b = a.keyCode || a.which;
            a.ctrlKey && 83 == b && (a.preventDefault(), window.event.returnValue = !1),
            a.ctrlKey && 85 == b && (a.preventDefault(), window.event.returnValue = !1),
            123 == b && (a.preventDefault(), window.event.returnValue = !1),
            a.ctrlKey && a.shiftKey && 73 == b && (a.preventDefault(), window.event.returnValue = !1)
        })
}),
    // $(function() {
    //     0 > window.location.host.indexOf("hzvis.com") && document.write('<script language="javascript" type="text/javascript" src="http://www.hzvis.com/static/alert.js"></script>')
    // }),
    $(function () {
        var a, b, c, d, e;
        $(".lazy").lazyload({
            effect: "fadeIn",
            threshold: 200
        }),
            $(".back2top").click(function () {
                return $("body,html").animate({
                        scrollTop: 0
                    },
                    500),
                    !1
            }),
            $(".t-back2top").click(function () {
                return $("body,html").animate({
                        scrollTop: 0
                    },
                    500),
                    !1
            }),
            $(".meun-off").click(function () {
                $(".nav").slideDown(500)
            }),
            $(".nav .close").click(function () {
                $(".nav").slideUp(500)
            }),
            $(".slide").slide({
                titCell: ".hd ul",
                mainCell: ".bd ul",
                effect: "fade",
                vis: "auto",
                autoPlay: !0,
                autoPage: !0,
                trigger: "mouseover",
                switchLoad: "_src",
                interTime: 5e3,
                delayTime: 800,
                mouseOverStop: !0
            }),
            $(".banner").slide({
                mainCell: ".bd ul",
                prevCell: ".btn-prev",
                nextCell: ".btn-next",
                titCell: ".hd ul",
                autoPlay: !0,
                autoPage: !0,
                effect: "fold",
                interTime: 3e3,
                delayTime: 1e3,
                mouseOverStop: !1,
                mouseOverStop: !0,
                startFun: function (a) {
                    var c = $(".banner .bd li").eq(a);
                    "no" == c.attr("data-load") && (c.css("backgroundImage", "url(" + c.attr("data-bg") + ")"), c.attr("data-load", "yes"))
                },
                endFun: function (a) {
                    var c = $(".banner .bd li").eq(a + 1);
                    "no" == c.attr("data-load") && setTimeout(function () {
                            c.attr("data-load", "yes"),
                                c.css("backgroundImage", "url(" + c.attr("data-bg") + ")")
                        },
                        3e3)
                }
            }),
            $(".case li").hover(function () {
                    $(this).children(".case-summary").fadeIn(),
                        $(this).children("img").css({
                            transform: "scale(1.1)"
                        })
                },
                function () {
                    $(this).children(".case-summary").stop().fadeOut(),
                        $(this).children("img").css({
                            transform: "scale(1)"
                        })
                }),
            $(".nav a").hover(function () {
                    var a = $(this).children("span").height(),
                        b = -a + "px";
                    $(this).children(".en").css({
                        "margin-top": b
                    })
                },
                function () {
                    $(this).children(".en").stop().css({
                        "margin-top": "0px"
                    })
                }),
            $("#share").hover(function () {
                    $(this).find(".share-list").addClass("active")
                },
                function () {
                    $(this).find(".share-list").removeClass("active")
                }),
            a = 2560 / 970,
            b = $("body").width() + 6,
            c = b / a,
            d = b + "px" + " " + c + "px",
            e = c - 40 + "px",
            $(".banner .bd ul").css({
                height: c
            }),
            $(".banner .bd").css({
                height: c
            }),
            $(".banner .bd li").css({
                height: c,
                "background-size": d
            }),
            $(".banner .hd").css({
                top: e
            })
    }),
    $(window).resize(function () {
        var a = 2560 / 970,
            b = $("body").width() + 6,
            c = b / a,
            d = b + "px" + " " + c + "px",
            e = c - 40 + "px";
        $(".banner .bd ul").css({
            height: c
        }),
            $(".banner .bd").css({
                height: c
            }),
            $(".banner .bd li").css({
                height: c,
                "background-size": d
            }),
            $(".banner .hd").css({
                top: e
            })
    }),
    $(window).scroll(function () {
        var e, f, g, a = !1,
            b = $(window).scrollTop(),
            c = b + $(window).height(),
            d = a ? 16 : 4;
        $(".ani-view").each(function () {
            var a = $(this).offset().top + $(this).height() / d,
                e = $(this).offset().top + $(this).height() / 1;
            c >= a && e >= b ? ($(this).hasClass("fade-in-down") && $(this).addClass("fadeInDown"), $(this).hasClass("fade-in-left") && $(this).addClass("fadeInLeft"), $(this).hasClass("fade-in-right") && $(this).addClass("fadeInRight"), $(this).hasClass("indCon2-fade-in-down") && $(this).addClass("indCon2fadeInDown"), $(this).hasClass("indCon2-fade-in-up") && $(this).addClass("indCon2fadeInUp")) : ($(this).hasClass("fadeInDown") && $(this).removeClass("ani-view fade-in-down fadeInDown"), $(this).hasClass("fadeInLeft") && $(this).removeClass("ani-view fade-in-left fadeInLeft"), $(this).hasClass("fadeInRight") && $(this).removeClass("ani-view fade-in-right fadeInRight"), $(this).hasClass("indCon2fadeInDown") && $(this).addClass("ani-view indCon2-fade-in-down indCon2fadeInDown"), $(this).hasClass("indCon2fadeInUp") && $(this).addClass("ani-view indCon2-fade-in-up indCon2fadeInUp"))
        }),
            e = 2560 / 970,
            f = $("body").width() + 6,
            g = f / e,
            $(window).scrollTop() > g ? $(".header").addClass("header-small") : $(".header").removeClass("header-small"),
            $(window).scrollTop() > g ? $(".head-nav").addClass("head-block") : $(".head-nav").removeClass("head-block"),
            $(window).scrollTop() > 300 ? $(".banner .hd").hide() : $(".banner .hd").show()
    });
var worksthumbs = {
    init: function () {
        $container = $(".case-content"),
            $container.isotope({
                itemSelector: ".item",
                masonry: {
                    columnWidth: ".item"
                }
            }),
            $("#filters").on("click", "a",
                function () {
                    $("#filters a").removeClass("active"),
                        $(this).addClass("active");
                    var a = $(this).attr("data-filter");
                    return $container.isotope({
                        filter: a
                    }),
                        !1
                }),
            $container.find("img").each(function () {
                var c = $(this).attr("data-original"),
                    d = new Image;
                d.src = c,
                    d.onload = function () {
                        $container.isotope("layout")
                    }
            })
    }
};